<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<form action="" method="post">
		<table class="table table-hover">

			<tr class="active">
				
			  <th>货品ID</th>
			  {{foreach from="$attrdata" value="$v"}}
			  <th width="90">{{$v[0]['taname']}}</th>			  
			  {{endforeach}}  
			  
			  <td >库存</td>
			  <th >货号</th>
			  <th >操作</th>
			</tr>
			{{foreach from="$data1" value="$v"}}
			<tr>

					<td>{{$v['glid']}}</td>	
					{{foreach from="$v['combine']" value="$vv"}}					
					<td>{{$vv['gtvalue']}}</td>
					{{endforeach}}
					<td>{{$v['inventory']}}</td>
					<td>{{$v['number']}}</td>				
				<td>
					<a href="{{U('edit',array('glid'=>$v['glid']))}}" class="btn btn-sm btn-warning">修改</a>					
					<a href="javascript:;" class="btn btn-sm btn-danger" onclick="if(confirm('确定删除吗')) location.href='{{U('del',array('glid'=>$v['glid']))}}'">删除</a>
					
				</td>
				
			</tr>
			{{endforeach}}
			<tr>
				<td>添加货品</td>
				{{foreach from="$attrdata" value="$v"}}	
				<td>
					<select name="combine[]" id="">
						
						<option value="">请选择</option>
						{{foreach from="$v" value="$vv"}}
						<option value="{{$vv['taid']}}">{{$vv['gtvalue']}}</option>
						{{endforeach}}
					</select>
				</td>
				{{endforeach}}
				
				<td>
					<input type="text" name="inventory" value="">
				</td>
				<td>
					<input type="text" name="number" value="">
				</td>
				<td>
					<input type="hidden" name="goods_gid" value="{{Q('get.gid')}}">
					<input type="submit" value="保存添加" class="btn btn-sm btn-warning"> 
				</td>
			</tr>
						
			
		</table>
		</form>
	</body>
</html>
